import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import router from './router'
import DataVVue3 from '@kjgl77/datav-vue3'
// import emitter from "@/plugins/emitter";
import 'element-plus/dist/index.css'
import '@/assets/css/main.scss'
import '@/assets/css/index.css'
import '@/assets/css/gepcalcdev.css'
import '@/assets/css/vepcalcdev.css'
import '@/assets/css/homepage.css'
import '@/assets/css/tailwind.css'
import {registerEcharts} from "@/plugins/echarts"
import '@fortawesome/fontawesome-free/css/all.css';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// import DataV from '@jiaminghi/data-view'
//不使用mock 请注释掉
// import { mockXHR } from "@/mock/index";
// mockXHR()
import axios from 'axios'
axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL


const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 创建并挂载 Pinia 实例
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate)

registerEcharts(app)
app.use(pinia)
app.use(router)
app.use(ElementPlus)
app.use(DataVVue3)
// app.use(DataV)
app.mount('#app')
